﻿
namespace AccessControl.Utility.Tools
{
    public static class RFID
    {
        public static string RfID14To10(string rfid)
        {
            var decValue = long.Parse(rfid);
            var hexValue = decValue.ToString("X");
            hexValue = hexValue.Substring(hexValue.Length - 8);
            var digits = long.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
            return new string('0', 10 - digits.ToString().Length) + long.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);
        }
    }
}
